package com.sinog.basic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sinog.core.domain.Resource;
import com.sinog.core.utilbean.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc 资源管理
 * @author zy
 * @date 2019年6月20日 18点00分
 */
@RestController
public interface MenuService extends IService<Resource> {

    /**
     * LIST页组件
     * @param account 账号
     * @param id 资源id
     * @param state state
     * @param level level
     * @return Result
     */
    @GetMapping("/basic/public-list/{id}")
    Result selectListPageComponent(
            @RequestParam String account,
            @PathVariable("id") Long id,
            @RequestParam(required = false, value = "state") String state,
            @RequestParam(required = false, value = "level") String level);

    /**
     * TAB页组件
     * @param account account
     * @param id id
     * @return Result
     */
    @GetMapping("/basic/public-tab/{id}")
    Result selectTabPageComponent(@RequestParam String account,@PathVariable Long id);
}